<script src="js/slider/effects.js" type="text/javascript"></script>
<script src="js/slider/carousel.js" type="text/javascript"></script>
<link href="css/prototype-ui.css" rel="stylesheet" type="text/css" />

<?php
/*
 * Created on Feb 23, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<?php 
	$projects = $infoModel->getItemsContentTypeById(PROJECT_ID, null, MAX_RECORD_LAST_PROJECT);
	 
?>
<div id="mainClm">
	<div class="box">
		<div class="last-new">
			<h2>Dự án nổi bật</h2>
		</div>
		<div id="iconListWrap">
			<div id="horizontal_carousel">  
				<div class="container">
					<ul>
					<?php while ($row = $infoModel->getArrayNameInfos($projects)) {  
					 	$imageFileName = PATH_CONTENT_IMAGE.$row["image"]; 
				 	  	if ($row["image"] && file_exists($imageFileName)) { 
				 	  		$imgTag = '<img src="'.$imageFileName.'" alt="" height="80" width="80" />';
				 	  	} else {
				 	  		$imgTag = '<img alt="" src="img/NoPhotoAvailable.jpg" height="80" width="80" />';
				 	  	} ?>
						<li class="btnLabel_s"><?php echo $imgTag; ?><br/><a href="itemdetail.php?itemdetailid=<?php echo $row['id'] ?>"><?php echo $row['title']; ?></a></li>
						
						
					  <?php } ?>
					</ul>
				</div>
			  <div class="buttons">
				  <div class="previous_button"></div>
				  <div class="next_button"></div>
				  <br />
			  </div>
			</div>
		</div>
	</div> 
</div>
 
<script>
function runTest() {
    hCarousel = new UI.Carousel("horizontal_carousel");
  }
  Event.observe(window, "load", runTest);
</script>
